<!DOCTYPE html>
<html lang="en">
<!--header-->
<include file="Public:header"/>
<!--header-->
<section id="main-content">
    <section class="wrapper">
        <h3><i class="fa fa-angle-right"></i> 添加/修改积分数信息</h3>

        <!-- BASIC FORM ELELEMNTS -->
        <div class="row mt">
            <div class="col-lg-12">
                <div class="form-panel">
                    <h4 class="mb"><i class="fa fa-angle-right"></i> 积分数
                        <a class="btn btn-theme btn-default" href="{:U('covers')}">返回</a>
                    </h4>
                    <form id="two_img" class="form-horizontal style-form" method="post" action=""  enctype="multipart/form-data">
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">签到积分数</label>
                            <div class="col-sm-10">
                                <input name="nums_one" value="{$list.nums_one}" type="text"  class="form-control" placeholder="请输入签到积分数，请参考天数输入">
                                <span>1-2天/3-4天/5-6天/7天以上</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">消费积分数（1元）</label>
                            <div class="col-sm-10">
                                <input name="nums_two" value="{$list.nums_two}" type="number"  class="form-control" placeholder="请输入消费积分数">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">转介者收益积分数比例（1元）</label>
                            <div class="col-sm-10">
                                <input name="nums_eight" value="{$list.nums_eight}" type="text"  class="form-control" placeholder="请输入转介者收益积分数比例">
                            </div>
                            <span>用户消费成功后，转介者每一元钱可获得的积分收益</span>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">分享积分数</label>
                            <div class="col-sm-10">
                                <input name="nums_three" value="{$list.nums_three}" type="number"  class="form-control" placeholder="请输入分享积分数">
                            </div>
                        </div>
                        <!--<div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">送花兑换积分数</label>
                            <div class="col-sm-10">
                                <input name="nums_four" value="{$list.nums_four}" type="number"  class="form-control" placeholder="请输入送花兑换积分数">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">兑换礼品积分数</label>
                            <div class="col-sm-10">
                                <input name="nums_five" value="{$list.nums_five}" type="number"  class="form-control" placeholder="请输入兑换礼品积分数">
                            </div>
                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">1积分值多少钱（元）</label>
                            <div class="col-sm-10">
                                <input name="nums_seven" value="{$list.nums_seven}" type="text"  class="form-control" placeholder="请输入1积分值多少钱">
                            </div>
                            <span>用户消费使用积分抵扣价格的比例</span>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label">一朵花的价格(元)</label>
                            <div class="col-sm-10">
                                <input name="nums_six" value="{$list.nums_six}" type="text"  class="form-control" placeholder="请输入一朵花的价格">
                            </div>
                        </div>
                        <input type="hidden" name="id" value="{$list.id}">
                        <div class="form-group">
                            <label class="col-sm-2 col-sm-2 control-label"></label>
                            <div class="col-sm-10">
                                <input  type="button" id="tianjia" class="btn btn-theme" value="保存" style="width: 150px;margin-left: 60px">
                                <input  type="reset" class="btn btn-warning" value="重置" style="width: 150px">
                            </div>
                        </div>
                    </form>
                </div>
            </div><!-- col-lg-12-->
        </div><!-- /row -->
    </section>
</section>
<!--footer-->
<include file="Public:footer"/>
<!--footer-->
<script type="text/javascript" src="__PUBLIC__/ui/lib/layer/2.4/layer.js"></script>
<script>
    $("#tianjia").click(function () {
        var form = new FormData(document.getElementById("two_img"));
        $.ajax({
            url:"{:U('covers_add')}",
            type:"post",
            data:form,
            processData:false,
            contentType:false,
            success:function(res){
                if(res.status == 1){
                    layer.open({
                        title: '提示：',content: '操作失败'
                    });
                }
                if(res.status == 2){
                    layer.open({
                        title: '提示：',content: res.info
                    });
                }
            }
        });
    })

</script>

</body>
</html>
